local cjson=require("cjson")



function logDump(value)
	if type(value)=="string" then
		log(value)
	elseif type(value)=="number" or
		type(value)=="userdata" or
		type(value)=="userdata" then
		log(tostring(value))
	else
		log(cjson.encode((value)))
	end
end


function string.split(inputstr, sep)
	if sep == nil then
		sep = "%s"
	end
	local t={}
	local i=1
	for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
		t[i] = str
		i = i + 1
	end
	return t
end

